1. Field of the Invention
The present invention relates to a storage apparatus, data write-in method, data read-out method, and recording medium which can be preferably used for a NAND type flash memory.
2. Description of the Prior Art
Conventionally, it has been suggested to use flash memory as a storage apparatus for storing data for computer applications, still cameras, video cameras, and audio data (i.e., music).
This flash memory stores data by an electric charge accumulated in a cell and erases data on a block basis which is an erase unit.
In the flash memory, prior to carrying out a data write-in, the cell should be in a clear state, i.e., data should have been erased by removing electrons from the cell. Then, data is written into the flash memory when an electric charge is poured into the cell so as to reverse the cell state.
As has been described above, the flash memory erases data by removing electric charge from the cell on block basis. A large power load is applied to the memory in removing the stored charge from the cells. Moreover, when writing data, a large load is also applied to the cell into which electric charge is poured.
Consequently, when a data re-write is repeated without carrying out bit reversal or when data remains almost unchanged, there exist cells to which electric charge is poured over time and cells to which no electric charge is poured. Thus, there arises a deviation in cell damage within a block, which in turn may shorten the block""s service life. Especially in the case of a management file or directory file where partial modifications are often carried out, repetition of a data write-in causes a cell damage deviation within the block.
By contrast, consider a flash memory where data re-write is carried out in a different block. However, there arises a problem that a management configuration is required for using a different block each time data is written, which results in a complicated configuration of the flash memory.
It is therefore an object of the present invention to provide a storage apparatus, a data write-in method, a data read-out method, and a recording medium which prevent concentration of damage to a particular cell caused by a data erase/write-in, thereby prolonging the serviceable life of the memory.
In order to achieve the aforementioned object, the storage apparatus according to the present invention includes: storage means for storing a data divided into blocks and a reverse flag indicating whether a bit of the data is reversed for each of the blocks; and control means for controlling a data write into the storage means and setting of a reverse flag.
In the aforementioned storage apparatus, the control means operates as follows. That is, if a reverse flag of a block to which a data from the storage means is to be written indicates a reversed bit, a reverse flag indicating no reversed bit is set when data is written, and if a reverse flag of a block to which a data from the storage means is to be written indicates no bit reversed, a reverse flag indicating a bit reverse to be executed is set and a data with bit reversed is written.
The data write-in method according to the present invention includes: a step of storing a data divided into a plurality of blocks and a reverse flag indicating whether a bit of the data is reversed for each of the blocks, so as to control a data write-in and a reverse flag setting.
According to this data write-in method, if a reverse flag of a block to which a data is to be written indicates a bit reversed, a reverse flag indicating no bit reversed is set when a data is written, and if a reverse flag of a block to which a data is to be written indicates no bit reversed, a reverse flag indicating a bit reverse to be executed is set and a data with bit reversed is written.
The storage apparatus according to the present invention includes: storage means for storing a data divided into a plurality of blocks and a reverse flag indicating whether a bit of the data is reversed in each of the blocks; and control means for controlling a read-out of a data from the storage means.
In the aforementioned storage apparatus, if a reverse flag of a block to which a data which has been read out from the control means belongs indicates that the bit is reversed, the control means controls reversal of the bits which have been read out.
The data read-out method according to the present invention includes: a step of storing data divided into blocks and a reverse flag indicating whether a bit of the data is reversed in each of the blocks when reading out stored data.
According to the aforementioned read-out method, a bit of data which has been read out is reversed if a reverse flag of a block to which the read out data belongs indicates that the bit is reversed.
The recording medium according to the present invention stores data divided into blocks and has a reverse flag indicating whether the bit of the data is reversed for each of the blocks.
According to the aforementioned recording medium, the reverse flag indicates whether a bit of the data recorded in each of the blocks is reversed.